package Tathy;

import java.awt.Graphics;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
import java.io.IOException;

import javax.imageio.ImageIO;


import GameEngine.GameObject2D;

public class Menu extends GameObject2D{
	Tathy tathy;
	Mapa mapa;
	Cow cow;
	FireBlue fireB;
	Inventario inv;
	 BufferedImage fundo; 
	 BufferedImage play;
	 BufferedImage tuto;
	 BufferedImage cred;
	public Menu() {
		super("Nome");
		try{
			
			fundo = ImageIO.read(getClass().getResource("tathyM2.jpg"));
			play = ImageIO.read(getClass().getResource("play.png"));
			tuto = ImageIO.read(getClass().getResource("tuto.png"));
			cred = ImageIO.read(getClass().getResource("cred.png"));
			
			} catch (IOException e) {
	e.printStackTrace();
	}
		
	}


	public void paint(Graphics g) {
		g.drawImage(fundo, 0, 0, null);
		g.drawImage(play, 600, 100, null);
		g.drawImage(tuto, 600, 150, null);
		g.drawImage(cred, 600,200,null);
	}


	public void updateKeyEvent(KeyEvent keyevent) {

		if (keyevent.getKeyCode() == KeyEvent.VK_ENTER
				&& keyevent.getID() == KeyEvent.KEY_RELEASED) {
			GameObject2D.gameObjects.clear();
			mapa = new Mapa();
			tathy = new Tathy();
			cow = new Cow();
			fireB = new FireBlue();
			inv = new Inventario();
		}
		
		
	}

	
	public void updateMouseEvent(MouseEvent mouseevent) {
	
		
	}

}
